<?php

/**
 * Created by Webman Model Generator.
 */

namespace app\model\Base;

use support\Model;
use Carbon\Carbon;

/**
 * Class ApijsonLog
 * 
 * @property string $id
 * @property string|null $space_id
 * @property string|null $user_id
 * @property string $user_type
 * @property string $request_id
 * @property string $caller_type
 * @property string $endpoint
 * @property array|null $request_json
 * @property array|null $response_json
 * @property string|null $sql_queries
 * @property int $execution_time
 * @property int $record_count
 * @property string|null $ip_address
 * @property string|null $user_agent
 * @property int $is_success
 * @property string|null $error_message
 * @property string|null $error_code
 * @property array|null $request_headers
 * @property array|null $response_headers
 * @property int|null $memory_usage
 * @property string|null $api_version
 * @property Carbon|null $created_at
 * @property Carbon|null $updated_at
 *
 * @package app\model\Base
 */
class ApijsonLog extends Model
{
    protected $table = 'apijson_logs';


    protected $casts = [
        'request_json' => 'array',
        'response_json' => 'array',
        'execution_time' => 'int',
        'record_count' => 'int',
        'is_success' => 'int',
        'request_headers' => 'array',
        'response_headers' => 'array',
        'memory_usage' => 'int'
    ];

    protected $fillable = [
        'space_id',
        'user_id',
        'user_type',
        'request_id',
        'caller_type',
        'endpoint',
        'request_json',
        'response_json',
        'sql_queries',
        'execution_time',
        'record_count',
        'ip_address',
        'user_agent',
        'is_success',
        'error_message',
        'error_code',
        'request_headers',
        'response_headers',
        'memory_usage',
        'api_version'
    ];
}
